Tape Recorder And Tape Recording That Increases Empty Tape Area Without Loss of Necessary Data

ABSTRACT

Provided is a tape recorder that has a tape including at least one partition and that controls access to the tape. The tape recorder includes: means for identifying a position of data on the tape; means for sequentially reading necessary data areas in the data; means for sequentially copying the necessary data areas to the beginning of an empty area on the tape; means for creating a continuous front empty area formed of unnecessary data areas and copy source areas of the necessary data areas on the tape; and means for moving a beginning of the partition (BOP) to a position immediately after the front empty area and for updating the position information on the beginning of the partition.

CLAIM OF PRIORITY

This application claims priority under 35 U.S.C §119 to Japanese PatentApplication No. 2009-268918 filed Nov. 26, 2009, the entire text ofwhich is specifically incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The field of the invention is data processing, or, more specifically,methods, apparatus, and products for tape recording that increases thecapacity of an empty area of tape without loss of necessary data.

2. Description of Related Art

In a conventional tape recorder (also called a “tape drive” in thefollowing description), the logical beginning of a tape (BOT), which isthe position where data recording starts, is used as the physicalbeginning of the tape, and data information to be recorded is recordedfrom this beginning. The information is read when the tape is inserted,and rewinding is performed when the tape is to be ejected. Further, thetypes of tape recorders include a cartridge type, an open reel type andthe like. In addition, some cartridge type tapes (magnetic tapes)include a memory to record system information.

When a magnetic tape drive is used to periodically record backup data orthe like, the drive is mainly used to keep only the most recent datawhile allowing deletion of previously recorded data. In this case,although the proportion of an unnecessary data area becomes large in afront half portion of the tape, the capacity of the front half portionof the tape is unnecessarily consumed in reality due to sequentialaccess.

In this respect, there has been employed a method to manage the capacityof a tape by copying (making a duplicate of) only effective data ontoanother tape medium (a medium using a tape is broadly termed as a “tapemedium”) when the proportion of an unnecessary data area on the tapeexceeds a certain amount (such operation is termed as reclaim).

FIG. 10 shows a relationship between an empty area and user data to bewritten on a tape 1000 by the prior art. Here, the logical beginning ofa tape medium, i.e., the write start position, which is the point wheredata is physically written initially on the tape, is called BOT(Beginning of Tape) 1010. Further, the logical end of the tape, i.e.,the write end position, which is the point where data cannot bephysically written anymore, is called EOT (End of Tape) 1020. A userdata group 1050 on the tape 1000 normally includes a mixture ofunnecessary data pieces 1052 and necessary data pieces 1054. Thepositions of BOT and EOT are always fixed, and the tape drive does notmove these positions. This is because the tape drive has no way todetermine which data piece is necessary and which data piece isunnecessary among the data pieces written on the tape. Further, the endof actually written data is called EOD (End of Data) 1030. The EODalways exists between the BOT and EOT. The area between the EOD and EOTis a so-called empty area 1040. Normally, the next piece of data iswritten in this empty area.

Magnetic tape drives often used today, for example, employ a method towrite data by moving a write position back and forth many times betweenthe both ends of the single tape while shifting the write positionlittle by little. In this case, the tape has multiple areas each calleda partition, and user data can be written in each of the partitions.Note that, such partitions can be created not only in a linear method inwhich a write position is moved back and forth many times between theboth ends of the tape as described above, but also in a helical methodin which all data is read or written by single movement of a tape fromone end of the tape to the other end thereof as in the case of a videotape.

When each of the positions of the beginning of a partition (BOP) and theend of the partition (EOP) is moved for writing data efficiently on atape, e.g., when BOP is moved to the back of the tape, there arises aproblem that, data existing between the previous position of the BOP andthe new position (current position) of the BOP becomes inaccessible.

Japanese Patent Application Publication No. 2002-190163 describes amethod for solving a problem of low use efficiency of a tape, which iscaused by concentration of access to a certain location in a magnetictape such as the portion of the beginning thereof. In the method, theposition of the logical beginning of a magnetic tape is updated bysequentially moving the position of the logical beginning of the tape.With this method, however, necessary data on the tape may be lost. Thisis because when the beginning of the tape is updated in this method,there is no operation to move necessary data, and no correspondence ismade such as assignment of a record number corresponding to a recordbeing variable-length data.

Japanese Patent Application Publication No. Hei 11-53869 describes amethod to avoid reading and writing from and to an unreadable bad datablock by providing a tape information management area includingmanagement units. The tape information management area is provided in arecordable beginning portion of a magnetic tape (BOT). The managementunits are configured to register and manage position information on tapemarks and position information on unreadable bad data blocks among datablocks. With this method, there remains a problem, however, that thebeginning of a tape (BOT) is repeatedly and intensively accessed whenthe tape is inserted. In addition, this method is considered to beunsuitable for an operation to move the beginning of a tape (BOT).

SUMMARY OF THE INVENTION

Accordingly, it is highly desirable to provide a method for effectivelyusing a tape by increasing an empty area of the tape without loss ofnecessary data on the tape. The present invention therefore has anobject to keep data on a tape even when the beginning of a partition(BOP) is updated in a tape including at least one area called apartition where user data is written. Specifically, the object of thepresent invention is to provide a tape drive that allows data to becontinuously and almost permanently written to a tape while keeping datadetermined to be necessary by a host system connected to the tape drive,and also to provide a recording method using the tape drive. Further,the present invention has an object to reduce unnecessary data area thatoften exists on a front half portion of a tape (magnetic tape) andthereby to increase an empty area of the tape.

The tape recorder (referred to as a “tape drive” in the followingdescription) has a tape medium made of a single tape cartridge. Thistape medium has at least one partition. This partition has the beginningof the partition (BOP) and the end of the partition (EOP), and user datais written between the BOP and EOP. When the tape medium has multiplepartitions, user data included in each of the partitions can beindependently updated. When the tape medium has only one partition, theBOP and EOP correspond to the beginning of the tape (BOT) and the end ofthe tape (EOT) of the prior art, respectively.

When the positions of the beginning of a partition (BOP) and the end ofthe partition (EOP) are moved for the purpose of efficiently writingdata on a tape medium, the following problems exist. Specifically, whenthe BOP is moved to the back of the tape, data existing between theprevious position of the BOP and the new position (current position) ofthe BOP becomes inaccessible. For this reason, a situation where onlyunnecessary data exists between the previous position of the BOP and thenew position of the BOP needs to be prepared before the BOP is moved.The conventional tape drive, however, has no information about whichdata is necessary and which data is unnecessary among data written tothe tape medium.

On the other hand, a cartridge housing a tape of the tape drive hasphysical position information on each data saved on the tape, i.e., aso-called tape directory in a nonvolatile memory called a cartridgememory (CM), for example. Accordingly, even when BOP is dynamicallymoved, corresponding physical positions can be found by effectivelyusing the position information, and thus it is made possible to readnecessary data.

According to a first aspect of the present invention, provided is a taperecorder for effectively using a tape by dynamically moving thepositions of the beginning of a partition (BOP) and the end of thepartition (EOP) and thus increasing an empty area of the tape. The taperecorder has a tape including at least one partition and that controlsaccess to the tape. The tape recorder comprises: means for identifying aposition of data on the tape; means for sequentially reading necessarydata areas in the data; means for sequentially copying the necessarydata areas to a beginning of an empty area on the tape; means forcreating a continuous front empty area formed of unnecessary data areasand copy source areas of the necessary data areas on the tape; and meansfor moving a beginning of the partition (BOP) to a position immediatelyafter the front empty area and for updating position information on thebeginning of the partition (BOP). The beginning of the partition (BOP)may be moved to a predetermined position in the front empty area.

Further, the updating means preferably moves an end of the partition(EOP) to a position at an end of the front empty area and adjacent tothe beginning of the partition (BOP) on the tape, and updates positioninformation on the EOP. Meanwhile, the updating means may move thebeginning of the partition (BOP) to a predetermined position in thefront empty area, then move an end of the partition (EOP) to a positionimmediately before the predetermined position and adjacent to thebeginning of the partition (BOP), and update the position information onthe BOP and the EOP. Moreover, the necessary data areas created atrespective copy destinations by the copying operation form a continuousnecessary data group, the necessary data group is located at a positionimmediately before the empty area at the back of the tape, and the emptyarea and the front empty area are arranged logically adjacent to eachother. In other words, the front empty area is preferably formed ofmultiple unnecessary data areas and a copy source area of a necessarydata area placed between two of the unnecessary data areas, and ispreferably continuous to the empty area in the rear direction of thetape.

The tape recorder further comprises storage means for storing theupdated position information on the BOP and the EOP, and a record numbercorrespondence table associating copy source positions of the data withcopy destination positions thereof. The data is identified by a recordnumber, and a copy destination position of each of the necessary dataareas may be registered in the record number correspondence table whenthe copying operation is performed.

The storage means is preferably selected from the group consisting of: acartridge memory embedded in a tape cartridge that houses the tape; ahouse keeping data set (HKDS) area located outside a user data area onthe tape; and a memory of a host system externally connected to the taperecorder.

The means for identifying a position of the data on the tape preferablyhas a memory for acquiring data information on the tape from anexternally connected host system and for recording the data informationtherein, and identifies positions of the unnecessary data areas and thenecessary data areas on the tape according to the data information.

The copying operation is preferably performed sequentially for thenecessary data areas which exist between the beginning of the partition(BOP) before being updated and an optional one of the unnecessary dataareas. Here, the front empty area is formed of multiple unnecessary dataareas and a copy source area of a necessary data area placed between twoof the unnecessary data areas and is continuous to the empty area in therear direction of the tape.

A logical end of data (EOD) is preferably located at an end of thenecessary data group on the tape, and the end of the data (EOD) ispreferably located at a position immediately before the empty area atthe back of the tape. The tape includes format identification (FID)corresponding to the partition, and the FID may be located outside auser data area on the tape.

The tape includes two or more partitions, and preferably also includes abuffer area between an end of a predetermined partition (EOP) and abeginning of another partition (BOP) continuous to the predeterminedpartition.

According to a second aspect of the present invention, provided is atape recording method for effectively using a magnetic tape bydynamically moving the positions of the beginning of a partition (BOP)and the end of the partition (EOP) and thus increasing an empty area ofthe tape. The tape recording method is for a tape recorder that has atape including at least one partition and that controls access to thetape. The method comprises the steps of: identifying a position of dataon the tape; sequentially reading necessary data areas in the data;sequentially copying the necessary data areas to a beginning of an emptyarea on the tape; creating a continuous front empty area formed ofunnecessary data areas and copy source areas of the necessary data areason the tape; and moving a beginning of the partition (BOP) to a positionimmediately after the front empty area and updating position informationon the BOP.

The method preferably further comprises a step of moving an end of thepartition (EOP) to a position at an end of the front empty area andadjacent to the beginning of the partition (BOP) on the tape andupdating position information on the EOP.

Further, the necessary data areas created at respective copydestinations by the copying operation form a continuous necessary datagroup, the necessary data group is located at a position immediatelybefore the empty area of the tape, and the empty area and the frontempty area are preferably arranged logically adjacent to each other tobe continuous.

In the step of identifying a position of the data, positions of theunnecessary data areas and the necessary data areas on the tape arepreferably identified according to record numbers corresponding to thedata, the record numbers being stored in a controller of the taperecorder.

Moreover, the step of copying the necessary data areas includes a stepof updating, after the copying operation, a content of a record numbercorrespondence table including positions of the copy sources and copydestinations of the data, and it is preferable that the copying step isrepeatedly performed for the necessary data areas which exist betweenthe beginning of the partition before being updated and an optional oneof the necessary data areas.

The position information on the BOP and the record number correspondencetable may be stored in a storage selected from the group consisting of:a tape cartridge memory (CM) embedded in a tape cartridge that housesthe tape; a house keeping data set (HKDS) area located outside a userdata area on the tape; and a memory of a host system externallyconnected to the tape recorder. Here, the position information on theEOP corresponding to the BOP may be stored.

Further, the method preferably comprises a step of switching the taperecorder to an idle mode before the step of identifying a position ofthe data on the tape, wherein the step of creating the front empty areaincludes a step of identifying the copy source areas of the necessarydata areas as a new unnecessary data area.

A logical end of data (EOD) is located at an end of the necessary datagroup, the copying step includes a step of sequentially overwriting theposition of the end of the data (EOD) with the necessary data areas, andit is preferable that the end of the data (EOD) is sequentiallyrearranged at the beginning of the empty area of the tape along with theoverwriting step.

Further, the method preferably comprises the steps of: moving thebeginning of the partition (BOP) to a predetermined position in thefront empty area of the tape, and moving an end of the partition (EOP)to a position immediately before the predetermined position and adjacentto the beginning of the partition (BOP); and updating the positioninformation on the BOP and the EOP.

The foregoing and other objects, features and advantages of theinvention will be apparent from the following more particulardescriptions of exemplary embodiments of the invention as illustrated inthe accompanying drawings wherein like reference numbers generallyrepresent like parts of exemplary embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing a configuration example of a tape drive 100to which the present invention is applied.

FIGS. 2A and 2B are diagrams each showing a data format example of atape according to the present invention.

FIGS. 3A to 3D are schematic diagrams for describing a data recordingmethod according to the present invention.

FIG. 4 is a diagram showing a flowchart of the data recording methodaccording to an embodiment.

FIG. 5 is a diagram showing an example of the data recording method fora tape of a tape cartridge.

FIG. 6 is a diagram showing a format example according to the presentinvention for the tape of the tape cartridge.

FIG. 7 is a diagram showing an example of a data reading method(flowchart) according to the present invention.

FIGS. 8A and 8B are diagrams showing a relationship between a tape headand a tape, as well as arrangement of multiple partitions according tothe present invention.

FIGS. 9A to 9D are diagrams showing a relationship between data bandsand multiple partitions on a tape.

FIG. 10 is a diagram showing an arrangement example of data pieces andan empty area on a tape according to the prior art.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, some typical embodiments of a tape recorder and a recordingmethod for the same according to the present invention will be descried.These embodiments are mere examples and do not limit the tape recorderor the tape recording method according to the present invention to theseembodiments.

A brief summary of a recording method for a tape drive according to thepresent invention will be described below. First, data information suchas information on an unnecessary data area on a tape is acquired from ahost system or from a tape cartridge memory (CM). Next, necessary datapieces existing near the beginning of a partition (BOP) are copied to aposition immediately before the end of data (EOD) (operation to make aduplicate of read data and then to write the duplicate is termed as“copy” in the following description) to practically move the necessarydata pieces. Accordingly, an area where only unnecessary data exists isprepared in advance in an area of a front half portion of the tape,i.e., in an area within a certain range from the BOP. Specifically,necessary data areas are sequentially copied to the position immediatelybefore the EOD, so that the necessary data pieces near the BOP, whichare the copy sources, can be treated as redundant data and thus regardedas an unnecessary area on the tape.

In the manner described above, an empty area is formed in a physicalfront half portion of the tape, and the necessary data pieces existingbetween the BOP and the EOD are collected at the position immediatelybefore the EOD to create a group of the necessary data pieces.Thereafter, the BOP is moved to the back to a position in front of thegroup of the necessary data pieces which are collected at the positionimmediately before the EOD. Then, a virtually continuous empty area canbe formed by moving the BOP in this manner, the virtually continuousempty area extending from an empty area at the back of the tapeimmediately after the EOD, to the empty area formed at the front of thetape. Here, the end of the partition (EOP) is considered to havevirtually moved to the end of the front empty area, i.e., the positionimmediately before the beginning of the partition (BOP). In this manner,a tape that functions as a virtually endless tape can be realized.

As to the host system connected to the tape drive, when the host systemaccesses the original address corresponding to one of the necessary datapieces, i.e., the original record number, the tape drive may convert theaddress into the current address (record number assigned after themoving of the necessary data piece) and then allow access to the newposition onto which the data piece is copied and moved, withoutinforming the host system that the necessary data piece has been copied.

Meanwhile, it is also possible to inform the host system of a new copydestination position. In the case of informing the host system of a copydestination position (current position), the necessary data piece at theoriginal position is regarded as no longer necessary after it isconfirmed that the host system has received the current position.

Hereinafter, an embodiment according to the present invention will bedescribed in more detail with reference to the drawings. To begin with,a description will be given of a tape recorder (hereinafter, referred toas a “tape drive”) which is a constituent element of the presentinvention. FIG. 1 shows a configuration diagram of a tape drive 100. Thetape drive 100 includes an interface 110, a buffer memory 120, arecording channel 130, a cartridge 140, a controller 160 and amechanical controller 170. The cartridge 140 has a tape 14 a, a head 14b, a pair of reels 14 c and 14 d, and a cartridge memory (CM) 180.

The interface 110 communicates with a host 10 via a bus 20. Theinterface 110 receives from the host 10 a command to write transferreddata to the buffer memory 120, and a command to write data in the buffermemory 120 to the tape 14 a. The communication standard of the interface110 is SCSI or Fibre Channel, for example.

The buffer memory 120 is a memory to accumulate therein variable-lengthdata to be written to the tape 14 a and is formed of a dynamic randomaccess memory (DRAM). The buffer memory 120 is partitioned intofixed-length segments, and each of the segments corresponds to a dataset (DS) on the tape 14 a.

The tape 14 a is data recording means and is also called a tape medium.Data is written to or read from the tape 14 a by the head 14 b via therecording channel 130. The tape 14 a is wound around the pair of reels14 c and 14 d, and moves along with rotation thereof in a directiondirected from the reel 14 c to the reel 14 d, or in the oppositedirection. The cartridge 140 is a container to house therein the reels14 c and 14 d around which the tape 14 a is wound. Note that, althoughFIG. 1 shows a system in which two reels are housed in the cartridge140, it is possible to employ a system in which a single reel isarranged on each of the tape drive side and the tape side.

The tape cartridge 140 includes therein a non-contact nonvolatile memorycalled the cartridge memory (CM) 180. The tape drive updates tapedirectory information (attribute information on write data) in the CM.When reading data, the tape drive moves the tape to a target position athigh speed by referring to the information stored in the CM and performspositioning. In the present invention, information on the beginning of apartition (BOP) and a record number correspondence table relating tomoving of data may be recorded in the cartridge memory (CM).

The controller 160 is also called a system controller and is means forcontrolling the entire tape drive 100. The controller 160 controlswriting of data to the tape 14 a and reading of data from the tape inaccordance with a command received from the host 10 via the interface110. In addition, the mechanical controller 170 connected to thecontroller 160 controls a head position control system and a motordriver. The head position control system tracks one or multiple desiredwraps (set of multiple tracks) on the tape and performs positioning ofthe head 14 b to the applicable position. The motor driver may bedirectly connected to the controller 160. The controller 160 accordingto the present invention has a memory 165, and this memory 165preferably includes data information (a record number, a file mark andthe like for necessary data or unnecessary data) on the tape.

In the operation of the tape drive, an interval at which a data set (DS)is written in the longitudinal direction of the tape medium needs to beminimized for the purpose of reducing a waste of storage capacity. Forthis reason, the mechanical controller 170 connected to the controller160 performs positioning of the tape medium 14 a to the head 14 b insuch a way that the next data is written from a position immediatelyafter a data set written to the tape medium (in other words, from theend of data (EOD)).

FIGS. 2A and 2B each shows a format example to which the presentinvention is applied. FIG. 2A shows a format of a tape 200 includingdata arrangement and an empty area. As will be described later (withreference to FIG. 5), FIG. 2A is considered to be a diagram presenting atape, which normally has multiple data bands (areas each including userdata and abbreviated as DB) thereon and on which data is written inspiral form, is stretched out into a single tape. The tape 200 hasphysical beginning of tape (PBOT) 202 and physical end of tape (PEOT)204. The tape 200 has an area called a partition between the PBOT andPEOT, where user data or the like is written. Then, data is writtenbetween the beginning of this partition (BOP) 210 and the end of thepartition (EOP) 260.

Data is normally represented by a bit set. The tape drive 100 writesdata sets (DSs), DS0, DS1, DS2, DS3, DS4 and DS5 to the tape shown inFIG. 2A, each of the data sets being fixed-length data. Each of the datasets is capable of storing therein one or multiple records (denoted asR1, R2, R3 and R4 in FIG. 2A) each being variable-length data that thehost system requests the tape drive to write. The initial data set DS0indicates format identification and is called an FID (FormatIdentification DS) 220, which has no record and is an area to show whatinformation is written on the tape. In addition, the host system writesa special bit string called a file mark (FM) in a data set instead of arecord in some cases. Moreover, when the capacity of a data set (DS)does not fit with the total capacity of a record, the tape drive may adda padding area P1 228, which is a blank space, to create a data set DS5as in FIG. 2A and write the data set on the tape. At the end of the datasets, an area including no record or file mark (FM) called an end ofdata (EOD) 230 is written to the tape. Then, an empty area 250 followsthe end of data (EOD). The next data is written to this empty area.Normally, the end of the empty area 250 is equivalent to the end of thepartition (EOP) 260.

FIG. 2A shows a case where the tape has only one partition, i.e., a casewhere the entire tape is used as a single partition, and the descriptionof the case has been given above. Alternatively, the tape may includemultiple partitions. In this case, each of the partitions may have anarea placed between BOP and EOP as shown in FIG. 2B. In a case wheremultiple partitions exist, data is written to or read from each of thepartitions as if no other partitions exist, i.e., data is written orread completely independently. In addition, as shown in FIG. 2B, abuffer area 290 is preferably placed between a partition 1 270 and apartition 2 275. This buffer area 290 can be provided by adjusting arelationship between the tape head and a write width (wrap width) ofdata. In the relationship between the linear tape shown in FIGS. 2A and2B and a later-described spiral tape configuration according to thepresent invention (FIG. 5), BOP and EOP correspond to LP3 and theboundary LP4 in later-described FIG. 5, respectively. In addition, anFID is located between LP2 and LP3. It is considered that a single FIDexists in each of the partitions, but multiple partitions may be used asa set by use of a single FID.

FIGS. 3A to 3D show a relationship between an outline of the taperecording method according to the present invention and data arrangementon the tape. FIG. 3A shows an initial state of the tape. Data is writtenfrom the beginning of a partition (BOP) and includes necessary datapieces denoted by A1, A2, A3 and A4 (hereinafter, referred to as An),respectively, and unnecessary data pieces denoted by B1, B2 and B3(hereinafter, referred to as Bn), respectively, in the drawings. The endof data (EOD) is placed at the last position of the data, i.e., the endthereof. The end of data (EOD) is the last data set and includes no data(no record or file mark). An empty area C1 is located at the back of theEOD. The end of the partition (EOP) is located at the end of C1 at theback of the empty area C1.

FIG. 3B shows a process in which the tape drive sequentially reads thenecessary data pieces An after acquisition of data information and thenmakes copies (duplicates) of the necessary data pieces onto a positionfrom the beginning of the empty area C1 while actually overwriting thearea of the EOD with the duplicates. Here, FIG. 3B shows a state afternecessary data pieces existing between the beginning of the partition(BOP) and an optional unnecessary data piece (Bn) among the necessarydata pieces are sequentially copied and thus moved. Specifically, A1between the BOP and the unnecessary data piece B2, and A2 and A3 betweenthe BOP and B3 shown in FIG. 3A are sequentially copied and thus movedin FIG. 3B. Note that, along with the copying operation, the copydestination positions are updated in the record number correspondencetable which is provided to associate the copy source positions with thecopy destination positions.

Next, after the necessary data pieces An are copied, the tape driveidentifies the necessary data pieces (A1) (A2) and (A3) of the copysources in FIG. 3B as unnecessary data pieces. This stage is shown inFIG. 3C. Accordingly, a continuous unnecessary user data area B′ iscreated at the front of the tape.

Lastly, the tape drive identifies the continuous unnecessary user dataarea B′ at the front of the tape as a new front empty area C2. Thisstage is shown in FIG. 3D. Here, the empty area C1 previously arrangedat the back of the tape and the new empty area C2 form a logicallycontinuous empty area (C1-C2). Here, the beginning of the partition(BOP) is moved to the beginning of the group of continuous necessarydata pieces (A4, A1, A2 and A3). Next, the end of the partition (EOP) ismoved from the end of the empty area C1 to the end of the empty area C2.Note that, it is also possible to move the BOP to a predeterminedposition Px (not shown) in the front empty area C2 instead of thebeginning of the necessary data group. In this case, the EOP may bemoved to a position immediately before the predetermined position.

When the procedure described above is performed, the tape driveaccording to the present invention can consider that the physical endand beginning of the partition are logically continuous and thus cancause the tape to function as a virtually endless tape. Specifically,according to the present invention, the empty area (C1-C2 in FIG. 3D)between the end of the data (EOD) and the logical end of the partition(EOP) can be continuously updated.

FIG. 4 is a flowchart showing an example of the embodiment of the datarecording method for a tape and showing a flow of realizing the dataarrangement (virtually endless tape) on the tape shown in FIG. 3D. Notethat in FIG. 4, for the sake of convenience, steps corresponding to thestates respectively shown in FIGS. 3A to 3D are denoted by the samereference numerals A to D. Hereinafter, the flowchart shown in FIG. 4will be described with reference to FIGS. 1 and 3A to 3D.

The controller 160 of the tape drive 100 first switches the tape drivefrom an operation mode (write mode or read mode) to an idle mode (step410). Subsequently, the controller 160 acquires data information (arecord number, a file mark or the like relating to information on anunnecessary data piece Bn or a necessary data piece An) from thecartridge memory (CM) 180, a house keeping data set (HKDS) area on thetape 14 a, or from the host system 10 via the system bus 20. Thus, theposition information on a necessary data piece An on the tape isidentified by referring to the information (step 415). Here, the HKDSarea is an area for managing address information on records and mayinclude information on moving of records.

Next, the controller 160 determines, by referring to the acquired datainformation, whether or not a necessary data piece An exists between thebeginning of a partition (BOP) and an optional unnecessary data piece Bn(step 420). Note that, the information on the beginning of the partition(BOP), and a record number correspondence table 432 are stored instorage means, preferably, in the cartridge memory (CM) 180, the recordnumber correspondence table 432 used for associating a copy source(original position) of a necessary data piece An with a copy destination(current position) thereof when copying of the necessary data piece Anis performed in later steps. Instead of being recorded in the CM, theaforementioned information may be recorded in the HKDS area locatedoutside the user data area on the tape, or may be received from the hostsystem 10.

Next, the following is a series of steps of copying a necessary datapiece An existing between the beginning of the partition (BOP) and anoptional unnecessary data piece Bn to the empty area C1. Specifically,in step 420, when a necessary data piece An exists between the beginningof the partition (BOP) and an optional unnecessary data piece Bn,whether or not a record number of the existing necessary data piece Anis registered in the record number correspondence table as the “currentposition” is determined first (step 430). If the record number isalready registered (YES in step 430), the necessary data piece An isread from the tape by use of the head 14 b, and then is copied to thebeginning position of the empty area C1. In other words, as shown inFIG. 3B, the EOD is sequentially overwritten with necessary data piecesAn (step 440). If NO in step 430, i.e., if the record number is notregistered in the record number correspondence table as the “currentposition,” the position of the necessary data piece An is registered inthe record number correspondence table as the “original position”because the necessary data piece is the copy source. Then, theprocessing proceeds to step 440 (step 435).

Next, along with the copying operation of the necessary data piece An,the “current position” of the necessary data piece An in the recordnumber correspondence table is updated with the copy destinationposition (step 450). The determination processing in step 420 isrepeated until a necessary data piece An no longer exists between theBOP and an optional unnecessary data piece Bn. Accordingly, thenecessary data pieces A1, A2 and A3 are sequentially copied to thebeginning of the empty area C1 by repeating the processing from step 430to step 450. FIG. 3B shows the state where the copying of all thenecessary data pieces An is completed.

If NO in step 420, i.e., when a necessary data piece An no longer existsbetween the BOP and an optional unnecessary data piece Bn, thecontroller 160 identifies the copy source areas of the necessary datapieces An ((A1), (A2) and (A3) shown in FIG. 3B) as unnecessary dataareas. Accordingly, the continuous unnecessary data area B′ is createdat the front of the tape (step 460). FIG. 3C shows this state.

The controller 160 identifies this continuous unnecessary data area B′to be the new empty area C2, and the empty area C1 previously located atthe back of the tape and the new empty area C2 form a logicallycontinuous empty area (C1-C2) at this time. Next, the controller 160moves the beginning of the partition (BOP) to the beginning of the groupof continuous necessary data pieces (An), i.e., to the positionimmediately after the front empty area C2 (step 470). Next, thecontroller 160 locates the end of the partition (EOP) at the end of theempty area C2, i.e., at a position adjacent to the BOP (step 480). FIG.3D shows this state of the data arrangement on the tape. Then, in thestep of “moving BOP and EOP,” the stored information on the positions ofBOP and EOP is updated. Note that, the information on the positions ofBOP and EOP is preferably stored in the cartridge memory (CM) or theHKDS (hose keeping data set) area, which is one of the data sets on thetape.

In step 470, the beginning of the partition (BOP) may be moved to apredetermined position (Px) (not shown) in the empty area C2 instead ofthe beginning of the group of the necessary data pieces (An) (theposition immediately after the front empty area C2). In this case, instep 480, the end of the partition (EOP) may be located at a positionimmediately before the predetermined position (Px) and adjacent to thebeginning of the partition (BOP) instead of the position immediatelyafter the empty area C2.

Hereinafter, a description will be given of a record management methodaccording to the present invention, which is shown in FIG. 4 and whichuses the record number correspondence table 432. This record managementmethod includes a method of managing records by the tape drive and amethod of managing records by the host/application.

The method of managing records by the tape drive is described asfollows.

The record number correspondence table can be obtained from thecartridge memory (CM), the HKDS area, or the memory on the host systemside when a tape medium is loaded (inserted) into the tape drive orthereafter. The CM and the HKDS area are normally accessed when a tapemedium is loaded into the tape drive and various data is read therefrom,and thus the record number correspondence table can also be obtainedduring the access operation. Otherwise, after the tape medium is loaded,a record number correspondence table corresponding to the loaded tapemedium can be obtained from the host system by requesting the host tosend the record number correspondence table from the host to the tapedrive (by a Write Buffer command or the like).

The obtained record number correspondence table is stored in the memory165 (random access memory (RAM), for example) of the controller 160 ofthe tape drive 100 shown in FIG. 1. The record number correspondencetable in the memory 165 is updated in step 450 of the flowchart shown inFIG. 4. The updating of the record number correspondence table in thecartridge memory (CM) or the HKDS is preferably performed immediatelybefore step 470 shown in FIG. 4, i.e., immediately before the moving ofBOP and EOP.

In a case where the host system is to hold the record numbercorrespondence table, the record number correspondence table is sent tothe host. For example, the host sends a SCSI command to the tape drive,and in response to the command, the tape drive sends the record numbercorrespondence table to the host. Note that, the tape drive can send aSCSI command to the host and send the record number correspondence tableto the host as well.

The record number correspondence table is used as a reference in themanner shown in the flowchart in FIG. 4. When the host side manages therecords, the host can convert a record number into a position obtainedafter the moving of data, and then instruct the tape drive to performreading and writing, so that the tape drive does not have to refer tothe record number.

When the host side updates a record number, instead of the tape drive,the host may read the record number for the tape drive and issue acommand to write data to the position of the EOD.

Although, a method to sequentially copy necessary data pieces to theposition immediately before the end of data (EOD) to realize a virtuallyendless tape function is described, it is also possible to copynecessary data pieces to an optional position. Meanwhile, as a virtuallyendless tape application, it is possible to allow copying of necessarydata pieces only to the EOD.

Assume a case where a necessary data piece near the BOP is copied to theEOD and a new copy (write) destination position is not notified to thehost system. When the host is allowed to issue a command to write to anoptional position after the copying, the following needs to beconsidered.

First, a function F(n) is defined as follows. If the n (record number)is registered as the “current value” in the record number correspondencetable, the function F(n) returns the original value corresponding to thecurrent value. If the n (record number) is not registered as the“current value,” the function F(n) returns the value n itself (n).

When the host issues a request to perform writing from the record numbern, for example, among all record numbers i existing between BOP and EOP,a record that satisfies F(i)<F(n) is left, and a record that does notsatisfy F(i)<F(n) (satisfy (F(i)>F(n) or F(i)=F(n)) is logicallydeleted. In other words, regardless of whether or not the recordphysically exists, the read request from the controller of the tapedrive is rejected.

All the records that exist between BOP and EOP and that satisfyF(i)<F(n) are read, and writing (copying) from the front of the EOD issequentially performed. Subsequently, writing of a data piece newly sentfrom the host is performed. Then, the BOP is moved to a position thathas been the front of the EOD immediately before the write (addition)request is received. Then, when the BOP is moved, the record numbercorrespondence table is updated. Here, the “front of EOD” is preferablya position which is closest to the EOD and which is immediately afterthe record that satisfies F(i)<F(n), and a record that satisfiesF(i)<F(n) and that is adjacent to the record does not have to berewritten. The moving destination of the BOP in this case does not haveto be the beginning of the group of the necessary data pieces (A4, A1,A2 and A3) shown in FIG. 3D, and may be the predetermined position Px(near the end in C2, for example (not shown)) of the empty area C2.

Meanwhile, since it takes a while to start writing, the data that thehost intends to perform writing can be temporarily stored in a buffermemory, and then the writing can be performed when the host is notifiedthat the writing is ended. Instead of being stored in the buffer memory,the data that the host intends to perform writing may be temporarilystored in an area outside the user data area on the tape (area betweenLP2 and LP3 shown in FIG. 5) or an empty area near the EOP.

In addition, it is also possible to perform writing from the EOD after adata piece existing between the position where data is to be logicallywritten (added) and the EOD is marked as unnecessary. In other words,writing is performed from the EOD without moving an already recordedrecord, and an unnecessary record number table (location where the dataacquired in step 410 in FIG. 4 is stored may be shared, for example) forall the records that do not satisfy F(n)<F(i) is registered. Then, if aread request for a record that satisfies a condition other thanF(n)<F(i) is received in this case, the read request is rejected.

When this method is employed, a step of checking the unnecessary recordnumber table at the time of reading a record is added.

Next, a description will be given of a format example of a tape loadedin a tape cartridge. FIG. 5 is a diagram schematically showing a datarecording method and the format example for a tape 500 in the tapecartridge 140. In the drawing, the area between LP2 and LP3 is acalibration area, and the area between LP3 and LP4 is a user data area.As illustrated, five servo bands 520 are provided on the tape 500. Eachof the servo bands is an area where a servo pattern showing a physicalposition on the tape is written at the time of manufacturing of the tape500.

In addition, in a case where the tape 500 is compliant with the LTO(Linear Tape-Open) standard, the tape 500 is divided into four databands 512 to 518 (DB0 to DB3) by the five servo bands. Each of the databands is an area where user data is written, and more than ten elongateddata areas (one way direction areas) each called a wrap are provided ineach of the data bands. Data is continuously written to wraps 530 ofeach of the data bands (DBs) in spiral form. In FIG. 5, a singlesolid-line arrow represents a single wrap 530. Data is read from andwritten to a wrap in the forward direction as shown by a rightdirectional arrow, and thereafter, data is read from and written to awrap in the reverse direction as shown by a left directional arrowconnected to the right directional arrow by a broken line. In thedrawing, two wraps each for data to be read and written in the forwarddirection and for data to be read and written in the reverse directionin a single data band are shown for the sake of simplification. However,seven to nine wraps are actually provided for each of the forward andreverse directions, for example, and the wraps are spirally arranged ina single data band.

Specifically, reading and writing in the forward direction and readingand writing in the reverse direction are repeatedly performed, andthereby, data is read and written while moving back and forth many timeson the tape 500. Note that, FIG. 5 is only a conceptual diagram and doesnot show the relationship with the head 14 b shown in FIG. 1. The tapedrive 100 normally has multiple heads (write head and read head) 14 b.

Further, in the format of the tape 500 described above, data is read andwritten along the wraps 530 spirally arranged in a data band #0, from astart position 501 as the origin, the start position 501 being theaforementioned beginning of a partition (BOP). Thereafter, the operationmoves in the order of data bands #1, #2 and #3 while data is read andwritten along the wraps spirally arranged in each of the data bands.Then, the operation proceeds to an end position 502, which is theaforementioned end of the partition (EOP). As a general rule, in thisformat, the operation moves to the next data band after the wraps in acertain data band are used up. FIGS. 2A and 2B are considered to bediagrams each showing a configuration obtained by stretching the spiraltape format shown in FIG. 5 into a straight line. In addition, thespiral tape may include not only a single partition as in the case ofFIG. 5, but also multiple different partitions each having a differentstart position 501 and end position 502.

FIG. 6 shows a format example according to the present invention for thetape in the tape cartridge. As shown in FIG. 6, the tape 500 has an areafor managing address information on records, which is called a housekeeping data set (also referred to as HKDS) 510, between LP2 and LP3,and which is also allowed to include information on moving of recordstherein. This HKDS 510 can be used in place of the aforementionedcartridge memory (CM) or together with the CM. In addition, theaforementioned FID (format ID) 220 can be located between LP2 and LP3.In general, FID is located between LP3 and LP3.1 immediately below thecenter servo band, but in the embodiment according to the presentinvention, when an HKDS exists, an FID is located between LP2 and LP3and below the HKDS area. In addition, as shown in FIG. 6, multiple FIDscorresponding to the number of partitions, for example, can be arrangedwhile being aligned in a single column. Although the multiple FIDs arevertically aligned in FIG. 6, the multiple FIDs may otherwise behorizontally aligned in a single row. The interval between LP2 and LP3normally has a length of about 8 mm. Accordingly, it is possible towrite multiple data sets (DSs) such as multiple FIDs, each of whichnormally has a length of about 0.1 mm.

In this invention, data is written to the tape by writing an FID to aposition between the LP2 and LP3 shown in FIG. 6, and subsequently,writing a partition 270 or 275 including a data set corresponding to theFID in a user data area 610 existing in an area between LP3 and LP4. Thesame goes for a case where multiple partitions exit. Referring to FIG.6, the diagram shows how partitions 1 and 2 respectively correspondingto FID-1 and FID-2 are arranged in different data bands. Note that, itis also possible to arrange two partitions in a single data band (DB).

FIG. 7 is a flowchart showing an example of a data reading methodaccording to the present invention, the method using a record numbercorrespondence table. The flowchart shows an operation of the tape drive100 in response to a read command from the host system 10. In thefollowing description, for the sake of convenience, the “originalposition” of a copy source is referred to as a record number N and the“current position” of a copy destination is referred to as a recordnumber M in the record number correspondence table.

To begin with, the controller 160 of the tape drive 100 receives a readcommand for data corresponding to a record number N from the host system10 (step 710). Then, the controller 160 first determines whether or notthe record number N is registered in the record number correspondencetable (step 720). Then, if the record number N is registered (YES instep 720), the controller 160 reads data corresponding to a recordnumber M according to the record number correspondence table instead ofthe record number N, and then sends the read data to the host system 10(step 740). This reading of the data can be performed after thecontroller 160 causes the mechanical controller 170 to operate, andmatches the position of the head 14 b with the applicable position onthe tape by the head position control system and the motor driver. If Noin step 720, the controller 160 reads data corresponding to the recordnumber N and sends the read data to the host system 10 (step 730).

In a case where the host keeps and manages the record numbercorrespondence table, the host updates a record number to a positionobtained after moving of data on the kept record number correspondencetable, so that the tape drive does not have to refer to the recordnumber correspondence table. Then, the host may issue a read command ora write command to the tape drive on the basis of the record numbercorresponding to the updated position.

FIG. 8A shows a relationship between a tape head and wraps on the tape.FIG. 8B shows an arrangement example of multiple partitions according tothe present invention. Here, it should be noted that the illustration ofthe wraps in FIGS. 8A and 8B differs from that of the wraps in FIG. 5for the purpose of simplifying the description. FIG. 8A shows how datais written on the tape 500 by a tape head 805 (14 b in FIG. 1).Normally, a single partition 820 is formed of multiple wraps 812 and814. The head, which is a mechanism for writing data, has a width Awider than a width B of each of the wraps where data is to be actuallywritten. For this reason, when data is written in spiral form in eachdata band (DB) as shown in FIG. 5, data is written while the head isshifted toward the center of the data band, and then, a portion of thewritten data protruding from the wrap toward the center of the data bandis overwritten when data is to be written next time. For example, whendata is written to the tape 500 by use of the tape head 805, the data iswritten while the head is shifted toward the center of the data band 810if the width of the head is larger than the width of each of the wraps.

As shown by an arrow in a broken line in FIG. 8A, data is continuouslywritten to the wraps 812 and 814 on the tape 500. When data is writtento the wrap 812, the data spreads out by the amount of width X on thewrap 814 adjacent to the centerline of the data band 810. This isbecause the write width A of the head 805 is larger than the wrap widthB. Accordingly, as shown in FIG. 8B, when partitions 0 832 and 1 834 areindividually arranged on the respective wraps 812 and 814, a buffer area840 corresponding to the spread-out width X can be preferably provided.Alternatively, the write width and the wrap width may be set to be equalto each other to omit the buffer area.

FIGS. 9A to 9D show a relationship between data bands 912 to 918 andmultiple partitions on the tape 500. Specifically, FIGS. 9A to 9D showan example of the tape 500, which shows a relationship between bufferareas and partitions. FIG. 9A shows a diagram of the entire tape, and asdescribed in FIG. 5, the data bands #0 to #3, i.e., 912 to 918 eachplaced between two of five servo bands 920 are arranged. FIG. 9B shows adiagram in which two partitions #0 and a partition #1 adjacent to eachother in the area of the data band #0 (DB0) 912 are spirally arranged.The doted line with arrows in FIG. 9B shows a moving direction of thetape head. As shown in FIG. 9B, when multiple partitions are created inthe same data band (DB), a buffer area 940 is preferably providedbetween adjacent two of the multiple partitions. FIG. 9C illustrates acase where partitions 932 and 934 (partitions 0 and 1) are respectivelyprovided in the data bands 912 and 914 (DB #0 and DB #1). In this case,no buffer area (940) needs to be formed between adjacent partitions asin the case shown in FIG. 9B. Note that, BOP shown in FIG. 9C indicatesthe beginning of a partition (BOP) and EOP shown in FIG. 9C indicatesthe end of the partition (EOP), which are arranged in a correspondingone of the partitions, and the servo band 920 is arranged between thepartitions.

FIG. 9D shows a diagram showing a state where an empty area is increasedby moving the beginning of a partition (BOP) by the method according tothe present invention in a single partition split across two wraps in asingle data band. For the sake of convenience, partition portionsforming the single partition are denoted by reference numerals A and A′,respectively. Specifically, FIG. 9D shows a case where the beginning ofa partition (BOP) and the end of the partition (EOP) are respectivelyarranged at the beginning position of the partition A 936 and the endposition of the partition A′936′ unlike the arrangement shown in FIG.9C, so that an area continuous from the end of the partition A to thebeginning of the partition A′ is formed. In this case, as shown in FIG.9D, the buffer area 940 may be provided between the wraps, but thebuffer area 940 is not necessarily provided because data can be writtenin spiral form while the head is shifted toward the center of the databand, and the spread-out portion is overwritten when writing isperformed next time.

The present embodiment has been described using an example of the casewhere BOP is moved to the back of the tape, but the direction in whichBOP is moved is not necessarily the back of the tape, and may be movedto the front thereof. In a case where a portion around EOD is notadditionally written (overwritten) because BOP having moved to the backis moved again to the front, the data that is previously determined tobe unnecessary in the front of the BOP can be recovered. Specifically,when data is additionally written, and the BOP and EOP are moved in sucha way that the BOP and EOP are arranged to shift from the state shown inFIG. 3D to FIG. 3B, the not-overwritten data area among the dataexisting in the area between the BOP and EOD shown in FIG. 3B becomesreadable.

According to the embodiment described above, a virtually endless tapecan be realized in a storage device by dynamically moving the positionsof the beginning of a partition (BOP) and the end of the partition(EOP). Specifically, the tape medium can be continuously used withoutcopying only necessary data onto another tape medium (such an operationis called reclaim). In addition, an area occupied by unnecessary data isconsidered to be an empty area. Thus, the data usage amount of the tapemedium can be reduced.

The present invention realizes a virtually endless tape in a tape driveby dynamically moving the positions of the beginning of a partition(BOP) and the end of the partition (EOP). Specifically, the tape mediumcan be continuously used without copying only necessary data ontoanother tape medium (such operation is called reclaim). In addition,since the area occupied by unnecessary data is considered to be anavailable capacity space, the data usage amount of the tape medium isreduced.

When files are recorded in a magnetic tape drive, an unused empty areais not increased in the tape even when an unnecessary file is deleted.Further, the tape capacity is not wastefully consumed in accordance witha file size, every time a file is updated. In view of theseexplanations, readers will recognize that the benefits of tape recordingaccording to embodiments of the present invention include:

-   -   effective use of tape that increases an empty area of the tape        without loss of necessary data on the tape,    -   keeping data on a tape even when the beginning of a partition is        updated in a tape,    -   provides a tape drive that allows data to be continuously and        almost permanently written to a tape while keeping data        determined by a host system to be necessary, and    -   reducing unnecessary data area that often exists on a front half        portion of a tape and thereby increasing an empty area of the        tape.

It will be understood from the foregoing description that modificationsand changes may be made in various embodiments of the present inventionwithout departing from its true spirit. The descriptions in thisspecification are for purposes of illustration only and are not to beconstrued in a limiting sense. The present invention is not limited tothe example embodiments described above, and various changes,improvements and the like of the present invention are possible withinthe scope of the present invention. The scope of the present inventionis limited only by the language of the following claims.

1. A tape recorder that has a tape including at least one partition andthat controls access to the tape, the tape recorder comprising: meansfor identifying a position of data on the tape; means for sequentiallyreading necessary data areas in the data; means for sequentially copyingthe necessary data areas to a beginning of an empty area on the tape;means for creating a continuous front empty area formed of unnecessarydata areas and copy source areas of the necessary data areas on thetape; and means for moving a beginning of the partition (BOP) to aposition immediately after the front empty area and for updatingposition information on the beginning of the partition (BOP).
 2. Thetape recorder according to claim 1 wherein the updating means moves anend of the partition (EOP) to a position at an end of the front emptyarea and adjacent to the beginning of the partition (BOP) on the tape,and updates position information on the EOP.
 3. The tape recorderaccording to claim 2, further comprising: storage means for storing theposition information on the BOP and the EOP, and a record numbercorrespondence table associating copy source positions of the data withcopy destination positions thereof, wherein the data is identified by arecord number, and a copy destination position of each of the necessarydata areas is registered in the record number correspondence table inresponse to the copying operation.
 4. The tape recorder according toclaim 3, wherein the storage means is selected from the group consistingof: a cartridge memory embedded in a tape cartridge that houses thetape; a house keeping data set (HKDS) area located outside a user dataarea on the tape; and a memory of a host system externally connected tothe tape recorder.
 5. The tape recorder according to claim 1, whereinthe updating means moves the beginning of the partition (BOP) to apredetermined position in the front empty area, then moves an end of thepartition (EOP) to a position immediately before the predeterminedposition and adjacent to the beginning of the partition (BOP), andupdates the position information on the BOP and the EOP.
 6. The taperecorder according to claim 1, wherein: the necessary data areas createdat respective copy destinations by the copying operation form acontinuous necessary data group, the necessary data group is located ata position immediately before the empty area at the back of the tape,and the empty area and the front empty area are arranged logicallyadjacent to each other.
 7. The tape recorder according to claim 6,wherein a logical end of data (EOD) is located at an end of thenecessary data group on the tape, and the end of the data (EOD) islocated at a position immediately before the empty area at the back ofthe tape.
 8. The tape recorder according to claim 1, wherein the meansfor identifying a position of the data on the tape has a memory foracquiring data information on the tape from an externally connected hostsystem and for recording the data information therein, and identifiespositions of the unnecessary data areas and the necessary data areas onthe tape according to the data information.
 9. The tape recorderaccording to claim 1, wherein the copying operation is performedsequentially for the necessary data areas which exist between thebeginning of the partition (BOP) before being updated and an optionalone of the unnecessary data areas.
 10. The tape recorder according toclaim 1, wherein the tape includes format identification (FID)corresponding to the partition, and the FID is located outside a userdata area on the tape.
 11. The tape recorder according to claim 1,wherein the tape includes two or more partitions, and also includes abuffer area between an end of a predetermined partition (EOP) and abeginning of another partition (BOP) continuous to the predeterminedpartition.
 12. A tape recording method for a tape recorder that has atape including at least one partition and that controls access to thetape, the method comprising the steps of: identifying a position of dataon the tape; sequentially reading necessary data areas in the data;sequentially copying the necessary data areas to a beginning of an emptyarea on the tape; creating a continuous front empty area formed ofunnecessary data areas and copy source areas of the necessary data areason the tape; and moving a beginning of the partition (BOP) to a positionimmediately after the front empty area and updating position informationon the BOP.
 13. The tape recording method according to claim 12, furthercomprising a step of moving an end of the partition (EOP) to a positionat an end of the front empty area and adjacent to the beginning of thepartition (BOP) on the tape and updating position information on theEOP.
 14. The tape recording method according to claim 12 wherein: thenecessary data areas created at respective copy destinations by thecopying operation form a continuous necessary data group, the necessarydata group is located at a position immediately before the empty area ofthe tape, and the empty area and the front empty area are arrangedlogically adjacent to each other to be continuous.
 15. The taperecording method according to claim 14 wherein: a logical end of data(EOD) is located at an end of the necessary data group, the copying stepincludes a step of sequentially overwriting the position of the end ofthe data (EOD) with the necessary data areas, and the end of the data(EOD) is sequentially rearranged at the beginning of the empty area ofthe tape along with the overwriting step.
 16. The tape recording methodaccording to claim 12, wherein: in the step of identifying a position ofthe data, positions of the unnecessary data areas and the necessary dataareas on the tape are identified according to record numberscorresponding to the data, the record numbers being stored in acontroller of the tape recorder; and the step of copying the necessarydata areas includes a step of updating, after the copying operation, acontent of a record number correspondence table including positions ofthe copy sources and copy destinations of the data, and the copying stepis repeatedly performed for the necessary data areas which exist betweenthe beginning of the partition before being updated and an optional oneof the necessary data areas.
 17. The tape recording method according toclaim 16, wherein the position information on the BOP and the recordnumber correspondence table are stored in a storage selected from thegroup consisting of: a tape cartridge memory (CM) embedded in a tapecartridge that houses the tape; a house keeping data set (HKDS) arealocated outside a user data area on the tape; and a memory of a hostsystem externally connected to the tape recorder.
 18. The tape recordingmethod according to claim 12, further comprising a step of switching thetape recorder to an idle mode before the step of identifying a positionof the data on the tape, wherein the step of creating the front emptyarea includes a step of identifying the copy source areas of thenecessary data areas as a new unnecessary data area.
 19. The taperecording method according to claim 12, further comprising the steps of:moving the beginning of the partition (BOP) to a predetermined positionin the front empty area of the tape, and moving an end of the partition(EOP) to a position immediately before the predetermined position andadjacent to the beginning of the partition (BOP); and updating theposition information on the BOP and the EOP.